app.controller("noteContentCtrl",function($scope,$stateParams,$http,$ionicLoading){
    // var getPath = JSON.parse(localStorage.getItem("getPath"));
    angular.element(document).ready(function(){
        $scope.getContent();
    });
    $scope.getContent = function () {
        var url = getPath.url+getPath.name+"/app/findNoteInfoByNum";
        var param = {
            noteNum:$stateParams.noteNum,
        }
        $http({
            url: url,
            method: "POST",
            headers:{'Content-Type':'application/x-www-form-urlencoded'},
            data: param
        }).success(function (data) {
                if (data.resultCode == 200) {
                    var res = data.resultBean;
                    $scope.strNoteDate = res.strNoteDate;
                    $scope.noteContent = res.noteContent;
                } else {
                    $ionicLoading.show({
                        template: "获取笔记失败！",
                        duration: 3000
                    });
                }
            })
            .error(function () {
                $ionicLoading.hide();
                $ionicLoading.show({
                    template: "获取阅读章节失败",
                    duration: 3000
                });
            });
    }
});